[mirrors]
ftp://ftp.gnu.org/gnu/groff/groff-1.22.2.tar.gz
http://ftpmirror.gnu.org/groff/groff-1.22.2.tar.gz

[vars]
filesize=4019913
sha512=ea34db53f075b6816827b07ac3d6a19ed50529c939044337eb3124575ac3b41363e1d81bbd5bf552a7a10f6b1dd233d6e7acaf646e18cfe94464c59dc20ffe80
desc="bloated gnu replacement for nroff and troff text formatters. C++."

[deps.host]
libstdc++

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
for i in doc contrib/hdtbl ; do
        printf 'all:\n\ttrue\ninstall:\n\ttrue\clean:\n\ttrue\n' > "$i"/Makefile.sub
done

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
